<template>
	<view class="goods-detail">
		<view class="goods-detail-main-wrapper">
			<view class="goods-cover-wrapper">
				<image
					:src="detail?detail.product_images:''"
					style="width: 100%;height: 100%;" mode="aspectFill" />
			</view>
			<view class="goods-info-wrapper">
				<view class="goods-name">
					{{detail?detail.name:''}}
				</view>
				<view class="goods-desc">
					{{detail?detail.dec:''}}
				</view>
				<view class="goods-price-count-wrapper">
					<view class="goods-count">
						X{{count}}
					</view>
					<view class="goods-price">
						<text class="label">共</text>￥{{totalPrice}}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script lang="ts" setup>
	import { defineProps } from 'vue';
	
	interface IProps{
		totalPrice:number,
		detail:IGoods|null,
		count:number|string,
	}
		
	const props = withDefaults(defineProps<IProps>(),{
		totalPrice:0,
		detail:null,
		count:0,
	})
</script>

<style scoped lang="scss">
	@import "./goodsDetail.scss";
</style>